obj-m		:= virtual_dev.o
KERNEL		:= /lib/modules/`uname -r`/build

all:
	@make -C $(KERNEL) M=`pwd` modules

clean:
	@make -C $(KERNEL) M=`pwd` clean

install:
	@sudo dmesg -c > /dev/null
	@sudo insmod virtual_dev.ko
	@sudo chmod 0666 /dev/virtual_device_0
	@dmesg
	@echo "\033[43m`ls -l /dev/virtual_device_0`\033[0m"

uninstall:
	@sudo rmmod virtual_dev
	@sudo dmesg -c
